package com.ruoyi.cderp.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品对象 base_data_product
 *
 * @author ruoyi
 * @date 2025-03-13
 */
public class BaseDataProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private String id;

    /** 编号 */
    @Excel(name = "编号")
    private String code;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 简称 */
    @Excel(name = "简称")
    private String shortName;

    /** SKU */
    @Excel(name = "SKU")
    private String skuCode;

    /** 外部编号 */
    @Excel(name = "外部编号")
    private String externalCode;

    /** 类目ID */
    @Excel(name = "类目ID")
    private String categoryId;

    // 类目名
    private String categoryName;

    /** 品牌ID */
    @Excel(name = "品牌ID")
    private String brandId;

    // 品牌名
    private String brandName;

    /** 商品类型 */
    @Excel(name = "商品类型")
    private Long productType;

    // 参考销售价
    private BigDecimal oriPrice;

    // 是否赠品
    private Integer isGift;

    /** 进项税率（%） */
    @Excel(name = "进项税率", readConverterExp = "%=")
    private BigDecimal taxRate;

    /** 销项税率 */
    @Excel(name = "销项税率")
    private BigDecimal saleTaxRate;

    /** 规格 */
    @Excel(name = "规格")
    private String spec;

    /** 单位 */
    @Excel(name = "单位")
    private String unit;

    // 折扣
    private BigDecimal discountRate;

    // 价格
    private BigDecimal taxPrice;

    // 库存数量
    private Integer stockNum;

    // 销售数量
    private Integer orderNum;

    /** 重量（kg） */
    @Excel(name = "重量", readConverterExp = "k=g")
    private BigDecimal weight;

    /** 体积（cm3） */
    @Excel(name = "体积", readConverterExp = "c=m3")
    private BigDecimal volume;

    /** 状态 */
    @Excel(name = "状态")
    private Integer available;

    /** 创建人ID */
    @Excel(name = "创建人ID")
    private String createById;

    /** 修改人ID */
    @Excel(name = "修改人ID")
    private String updateById;

    /** 图片路径 */
    @Excel(name = "图片路径")
    private String imageUrl;

    // 备注
    private String description;

    //商品品牌
    private BaseDataProductBrand baseDataProductBrand;

    //商品类目
    private BaseDataProductCategory baseDataProductCategory;

    //商品所属仓库
    private Center center;

    //商品库存
    private TblProductStock tblProductStock;

    //商品采购价
    private BaseDataProductPurchase baseDataProductPurchase;

    public BaseDataProductPurchase getBaseDataProductPurchase() {
        return baseDataProductPurchase;
    }

    public void setBaseDataProductPurchase(BaseDataProductPurchase baseDataProductPurchase) {
        this.baseDataProductPurchase = baseDataProductPurchase;
    }

    public TblProductStock getTblProductStock() {
        return tblProductStock;
    }

    public void setTblProductStock(TblProductStock tblProductStock) {
        this.tblProductStock = tblProductStock;
    }

    public Center getCenter() {
        return center;
    }

    public void setCenter(Center center) {
        this.center = center;
    }

    // 订单id
    private String orderId;

    // 订单详情id
    private String orderDetailId;

    // 订单排序编号
    private String orderNo;

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }


    public String getOrderDetailId() {
        return orderDetailId;
    }

    public void setOrderDetailId(String orderDetailId) {
        this.orderDetailId = orderDetailId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Integer getStockNum() {
        return stockNum;
    }

    public void setStockNum(Integer stockNum) {
        this.stockNum = stockNum;
    }

    public BigDecimal getOriPrice() {
        return oriPrice;
    }

    public void setOriPrice(BigDecimal oriPrice) {
        this.oriPrice = oriPrice;
    }

    public Integer getIsGift() {
        return isGift;
    }

    public void setIsGift(Integer isGift) {
        this.isGift = isGift;
    }

    public BigDecimal getDiscountRate() {
        return discountRate;
    }

    public void setDiscountRate(BigDecimal discountRate) {
        this.discountRate = discountRate;
    }

    public BigDecimal getTaxPrice() {
        return taxPrice;
    }

    public void setTaxPrice(BigDecimal taxPrice) {
        this.taxPrice = taxPrice;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public BaseDataProductBrand getBaseDataProductBrand() {
        return baseDataProductBrand;
    }

    public void setBaseDataProductBrand(BaseDataProductBrand baseDataProductBrand) {
        this.baseDataProductBrand = baseDataProductBrand;
    }

    public BaseDataProductCategory getBaseDataProductCategory() {
        return baseDataProductCategory;
    }

    public void setBaseDataProductCategory(BaseDataProductCategory baseDataProductCategory) {
        this.baseDataProductCategory = baseDataProductCategory;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode()
    {
        return code;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setShortName(String shortName)
    {
        this.shortName = shortName;
    }

    public String getShortName()
    {
        return shortName;
    }
    public void setSkuCode(String skuCode)
    {
        this.skuCode = skuCode;
    }

    public String getSkuCode()
    {
        return skuCode;
    }
    public void setExternalCode(String externalCode)
    {
        this.externalCode = externalCode;
    }

    public String getExternalCode()
    {
        return externalCode;
    }
    public void setCategoryId(String categoryId)
    {
        this.categoryId = categoryId;
    }

    public String getCategoryId()
    {
        return categoryId;
    }
    public void setBrandId(String brandId)
    {
        this.brandId = brandId;
    }

    public String getBrandId()
    {
        return brandId;
    }
    public void setProductType(Long productType)
    {
        this.productType = productType;
    }

    public Long getProductType()
    {
        return productType;
    }
    public void setTaxRate(BigDecimal taxRate)
    {
        this.taxRate = taxRate;
    }

    public BigDecimal getTaxRate()
    {
        return taxRate;
    }
    public void setSaleTaxRate(BigDecimal saleTaxRate)
    {
        this.saleTaxRate = saleTaxRate;
    }

    public BigDecimal getSaleTaxRate()
    {
        return saleTaxRate;
    }
    public void setSpec(String spec)
    {
        this.spec = spec;
    }

    public String getSpec()
    {
        return spec;
    }
    public void setUnit(String unit)
    {
        this.unit = unit;
    }

    public String getUnit()
    {
        return unit;
    }
    public void setWeight(BigDecimal weight)
    {
        this.weight = weight;
    }

    public BigDecimal getWeight()
    {
        return weight;
    }
    public void setVolume(BigDecimal volume)
    {
        this.volume = volume;
    }

    public BigDecimal getVolume()
    {
        return volume;
    }
    public void setAvailable(Integer available)
    {
        this.available = available;
    }

    public Integer getAvailable()
    {
        return available;
    }
    public void setCreateById(String createById)
    {
        this.createById = createById;
    }

    public String getCreateById()
    {
        return createById;
    }
    public void setUpdateById(String updateById)
    {
        this.updateById = updateById;
    }

    public String getUpdateById()
    {
        return updateById;
    }
    public void setImageUrl(String imageUrl)
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl()
    {
        return imageUrl;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("name", getName())
            .append("shortName", getShortName())
            .append("skuCode", getSkuCode())
            .append("externalCode", getExternalCode())
            .append("categoryId", getCategoryId())
                .append("categoryName", getCategoryName())
            .append("brandId", getBrandId())
                .append("brandName", getBrandName())
            .append("productType", getProductType())
                .append("oriPrice", getOriPrice())
                .append("isGift", getIsGift())
                .append("discountRate", getDiscountRate())
                .append("taxPrice", getTaxPrice())
                .append("stockNum", getStockNum())
                .append("orderNum", getOrderNum())
                .append("description", getDescription())
            .append("taxRate", getTaxRate())
            .append("saleTaxRate", getSaleTaxRate())
            .append("spec", getSpec())
            .append("unit", getUnit())
            .append("weight", getWeight())
            .append("volume", getVolume())
            .append("available", getAvailable())
            .append("createBy", getCreateBy())
            .append("createById", getCreateById())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateById", getUpdateById())
            .append("updateTime", getUpdateTime())
            .append("imageUrl", getImageUrl())
            .toString();
    }
}
